{include file='./inc/header.tpl'}
<div id="wrap">
    {include file='./inc/head.tpl'}
    <div id="contents">
        <div class="ttl">
            <h2>
                人材一覧
            </h2>
        </div>
        {if !empty($apply)} {include file='./inc/message.tpl'}
        <form action="./admin/apply" id="form1" name="form1" method="post">
            <input type="hidden" name="transid" value="{$transactionid}">
            <input type="hidden" name="mode" value="search">
            <input type="hidden" name="apply_id" value="">
            <!--{foreach from=$arrHidden key="key" item="item"}-->
                <!--{if is_array($item)}-->
                    <!--{foreach item=c_item from=$item}-->
                        <input type="hidden" name="{$key}[]" value="{$c_item}" />
                    <!--{/foreach}-->
                <!--{else}-->
                    <input type="hidden" name="{$key}" value="{$item}" />
                <!--{/if}-->
            <!--{/foreach}-->
            <table>
                <thead>
                    <th>人材名</th>
                    <th>国家</th>
                    <th>電話番号</th>
                    <th>メール</th>
                    <th>仕事コード</th>
                    <th>添付ファイル</th>
                    <th>登録日</th>
                    <th></th>
                </thead>
               結果：{$apply_cnt}件
                <br />
                <br />
                <tbody>
                    {foreach from=$apply item=item name=count}
                    <tr class="selectTarget {if ($smarty.foreach.count.index +1) % 2 == 0}even{/if}">
                        <td>{$item.name}</td>
                        <td>{$item.nation}</td>
                        <td>{$item.phone}</td>
                        <td>{$item.email}</td>
                        <td>{if $item.job_code != 0}{$item.job_code}{/if}</td>
                        <td><a target="_blank" href="/attach/{$item.save_attach}">{$item.attach}</a></td>
                        <td>{$item.regist_datetime}</td>
                        <td>
                            <a href="javascript:;" onclick="edit({$item.apply_id});">
                                <span class="btn">詳細</span>
                            </a>
                        </td>
                    </tr>
                    {/foreach}
                </tbody>
            </table>
            <div class="pager">
                <ul>{$pager}
                </ul>
            </div>
            <script type="text/javascript">
            function edit(id){
            	document.form1.action = './admin/candidate/edit';
            	document.form1['apply_id'].value = id;
            	document.form1['mode'].value = 'pre_edit';
            	document.form1.submit();
            }
            </script>
            {else}
            <div style="color: red;">データがありません。</div>
        </form>
        {/if}
    </div>
    <!-- #contents -->
</div>
<!-- #wrap -->
<script type="text/javascript">
$(document).ready(function($) {
    $('.open').click(function(){
        $(this).parent().find( "div.slideBox" ).stop(true, true).slideToggle("fast");
        var is_search = $('input[name="search_form_display"]').val();
        $('input[name="search_form_display"]').val((is_search == 1 ? 0 : 1));
    });
});
</script>
{include file='./inc/footer.tpl'}